// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PUR_QUOTE_ITEM
// * CreateDate    : 2011/10/25 11:27:58
// * Creater       : CodeSmith
// * LastChangeDate: 2011/10/25 11:27:58
// * LastChanger   : 2011/10/25 11:27:58
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class PurQuoteItemEntity : EntityBase
    {
        public PurQuoteItemTable TableSchema
        {
            get
            {
                return PurQuoteItemTable.Current;
            }
		}
		
		public PurQuoteItemEntity()
        {

        }
		
		public PurQuoteItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.QuoteItemId = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_ITEM_ID"]));
			this.QuoteOrderId = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_ORDER_ID"]));
			this.PurchaseItemId = Convert.ToString(CommonFunctions.ToObject(dr["PURCHASE_ITEM_ID"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.PriceNoTax = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE_NO_TAX"]));
			this.TaxRate = Convert.ToDecimal(CommonFunctions.ToObject(dr["TAX_RATE"]));
			this.MaxPrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["MAX_PRICE"]));
			this.MinPrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["MIN_PRICE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public PurQuoteItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.QuoteItemId = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_ITEM_ID"]));
			this.QuoteOrderId = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_ORDER_ID"]));
			this.PurchaseItemId = Convert.ToString(CommonFunctions.ToObject(dr["PURCHASE_ITEM_ID"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.PriceNoTax = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE_NO_TAX"]));
			this.TaxRate = Convert.ToDecimal(CommonFunctions.ToObject(dr["TAX_RATE"]));
			this.MaxPrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["MAX_PRICE"]));
			this.MinPrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["MIN_PRICE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return PurQuoteItemTable.Current;
            }
        }
		
		#region Perporty List
        public string QuoteItemId
        {
            get { return Convert.ToString(GetData(PurQuoteItemTable.C_QUOTE_ITEM_ID)); }
            set { SetData(PurQuoteItemTable.C_QUOTE_ITEM_ID, value); }
        }
		
        public string QuoteOrderId
        {
            get { return Convert.ToString(GetData(PurQuoteItemTable.C_QUOTE_ORDER_ID)); }
            set { SetData(PurQuoteItemTable.C_QUOTE_ORDER_ID, value); }
        }
		
        public string PurchaseItemId
        {
            get { return Convert.ToString(GetData(PurQuoteItemTable.C_PURCHASE_ITEM_ID)); }
            set { SetData(PurQuoteItemTable.C_PURCHASE_ITEM_ID, value); }
        }
		
        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(PurQuoteItemTable.C_QTY)); }
            set { SetData(PurQuoteItemTable.C_QTY, value); }
        }
		
        public decimal PriceNoTax
        {
            get { return Convert.ToDecimal(GetData(PurQuoteItemTable.C_PRICE_NO_TAX)); }
            set { SetData(PurQuoteItemTable.C_PRICE_NO_TAX, value); }
        }
		
        public decimal TaxRate
        {
            get { return Convert.ToDecimal(GetData(PurQuoteItemTable.C_TAX_RATE)); }
            set { SetData(PurQuoteItemTable.C_TAX_RATE, value); }
        }
		
        public decimal MaxPrice
        {
            get { return Convert.ToDecimal(GetData(PurQuoteItemTable.C_MAX_PRICE)); }
            set { SetData(PurQuoteItemTable.C_MAX_PRICE, value); }
        }
		
        public decimal MinPrice
        {
            get { return Convert.ToDecimal(GetData(PurQuoteItemTable.C_MIN_PRICE)); }
            set { SetData(PurQuoteItemTable.C_MIN_PRICE, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(PurQuoteItemTable.C_REMARK)); }
            set { SetData(PurQuoteItemTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

